﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;

namespace KPIS.GERP.ESS.APP.App_UI.Forms
{
    public partial class ESS_Redirect : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string strServerURL = Request.Url.Host + (ConfigurationSettings.AppSettings["SubSystem"].ToString().Length > 0 ? "/" + ConfigurationSettings.AppSettings["SubSystem"].ToString() : "");
            string strSystem = Request.QueryString["sys"];
            string strPageName = Request.QueryString["page"];
            string strURL = "";

            if (strSystem == "GIMS" || strSystem == "GBMS")
                strURL = @"//" + strServerURL + @"/" + strSystem + @"/App_UI/Form/Default.aspx?page=" + strPageName;
            else
                strURL = @"//" + strServerURL + @"/" + strSystem + @"/App_UI/Forms/Default.aspx?page=" + strPageName; 

            Response.Write("        <meta HTTP-EQUIV=\"Refresh\" CONTENT=\"2;URL=" + strURL + "\" />");
        }
         
    }
}